package com.jumi.microservice.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jumi.microservice.common.base.AbstractObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 商品SPU表VO类
 *
 * @author Administrator
 */
@ApiModel(value = "Goods spu VO值对象", description = "Goods spu VO值对象")
public class GoodsVO extends AbstractObject implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "商品类型1：单个商品；2：第三方商品;3:商品组合")
    @NotNull(message = "商品类型不能为空")
    private Integer goodsType;

    @ApiModelProperty(value = "物料的商品spuid")
    private Long materialSpuId;

    @ApiModelProperty(value = "物料的商品spu编码")
    private String materialSpuCode;

    @ApiModelProperty(value = "物料的商品spu名称")
    @NotNull(message = "选择商品不能为空")
    private String materialSpuName;

    @ApiModelProperty(value = "商品spu编码")
    private String spuCode;

    @ApiModelProperty(value = "商品名称")
    @NotNull(message = "商品标题不能为空")
    @Length(min = 3, max = 50, message = "商品标题长度至少{min}个字符，最长{max}个字符")
    private String goodsName;

    @ApiModelProperty(value = "商品简称")
    @NotNull(message = "商品简称不能为空")
    @Length(min = 3, max = 20, message = "商品简称长度至少{min}个字符，最长{max}个字符")
    private String shortName;

    @ApiModelProperty(value = "商品描述")
    @NotNull(message = "商品描述不能为空")
    @Length(min = 8, max = 60, message = "商品描述长度至少{min}个字符，最长{max}个字符")
    private String goodsDescription;

    @ApiModelProperty(value = "一级分类id")
    @NotNull(message = "商品分类不能为空")
    private Long creatgroyFirst;

    @ApiModelProperty(value = "二级分类id")
    @NotNull(message = "商品分类不能为空")
    private Long creatgroySecond;

    @ApiModelProperty(value = "品牌id")
    @NotNull(message = "所属品牌不能为空")
    private Long brandId;

    @ApiModelProperty(value = "供应商ID")
    private Long supplyId;

    @ApiModelProperty(value = "退件地址")
    private String returnAddress;

    @ApiModelProperty(value = "供应商名称")
    private String supplier;

    @ApiModelProperty(value = "是否是隐私商品0：否；1：是")
    @NotNull(message = "是否是隐私商品不能为空")
    private Integer isPrivacy;

    @ApiModelProperty(value = "设置固定返利;0:否；1：是；（返利接单费固定0.1元，差价0.0元）")
    private Integer fixRebate;

    @ApiModelProperty(value = "是否是引流商品;0:否；1：是")
    private Integer isYinliu;

    @ApiModelProperty(value = "是否是海外")
    private Integer isImport;

    @ApiModelProperty(value = "商品源国家")
    private Integer goodCountry;

    @ApiModelProperty(value = "运费模板ID")
    @NotNull(message = "运费模板不能为空")
    private Long transportId;

    @ApiModelProperty(value = "运费模板名称")
    private String transportName;

    @ApiModelProperty(value = "商品标签id 首尾用,隔开")
    private String goodsLabel;

    @ApiModelProperty(value = "是否开增值税发票;0:否；1：是")
    private Integer isVatinvoice;

    @ApiModelProperty(value = "上架时间")
    private String goodsSelltime;

    @ApiModelProperty(value = "视频地址")
    private String videoUrl;

    @ApiModelProperty(value = "顶部关联板式")
    private Long plateidTop;

    @ApiModelProperty(value = "底部关联板式")
    private Long plateidBottom;

    @ApiModelProperty(value = "商品状态  1：立即上架；2：下架状态;3:定时上架")
    @NotNull(message = "商品发布不能为空")
    private Integer goodsState;

    @ApiModelProperty(value = "市场价")
    private BigDecimal goodsMarketprice;

    @ApiModelProperty(value = "商品内容")
    @NotNull(message = "商品详情页底部详情图不能为空")
    private String goodsBody;

    @ApiModelProperty(value = "商品价格")
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "添加人")
    private String creater;

    @ApiModelProperty(value = "添加时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人")
    private String modifier;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "商品和物料的spu对应关系集合")
    List<CommodityMaterialSpuRelationshipVO> commodityMaterialSpuRelationship = new ArrayList<>();

    @ApiModelProperty(value = "sku集合")
    private List<GoodsSkuVO> goodsSkus= new ArrayList<>();

    @ApiModelProperty(value = "商品图片")
    @NotNull(message = "商品详情页顶部大图不能为空")
    private List<GoodsPictureVO> goodsPicture = new ArrayList<>();

    @ApiModelProperty(value = "商品主图")
    private String goodsImage;

    @ApiModelProperty(value = "已售库存")
    private Integer saledStorage;

    @ApiModelProperty(value = "实时总库存")
    private Integer saleStorage;

    @ApiModelProperty(value = "商品浏览量")
    private Integer goodsViews;

    @ApiModelProperty("旺店通商品ID")
    private Long wdtGoodsId;

    @ApiModelProperty(value = "商品spu和税收对应关系VO值对象")
    private GoodsTaxVO goodsTax;

    @ApiModelProperty("商品不发货地区id")
    private String noDeliveryRegionId;

    @ApiModelProperty("商品不发货地区名称")
    private String noDeliveryRegionName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(Integer goodsType) {
        this.goodsType = goodsType;
    }

    public Integer getIsPrivacy() {
        return isPrivacy;
    }

    public void setIsPrivacy(Integer isPrivacy) {
        this.isPrivacy = isPrivacy;
    }

    public Integer getIsYinliu() {
        return isYinliu;
    }

    public void setIsYinliu(Integer isYinliu) {
        this.isYinliu = isYinliu;
    }

    public Integer getIsImport() {
        return isImport;
    }

    public void setIsImport(Integer isImport) {
        this.isImport = isImport;
    }

    public Integer getIsVatinvoice() {
        return isVatinvoice;
    }

    public void setIsVatinvoice(Integer isVatinvoice) {
        this.isVatinvoice = isVatinvoice;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getSupplier() {
        return supplier;
    }

    public void setSupplier(String supplier) {
        this.supplier = supplier;
    }

    public Integer getPrivacy() {
        return isPrivacy;
    }

    public void setPrivacy(Integer privacy) {
        isPrivacy = privacy;
    }

    public Integer getFixRebate() {
        return fixRebate;
    }

    public void setFixRebate(Integer fixRebate) {
        this.fixRebate = fixRebate;
    }

    public Integer getYinliu() {
        return isYinliu;
    }

    public void setYinliu(Integer yinliu) {
        isYinliu = yinliu;
    }

    public Integer getGoodCountry() {
        return goodCountry;
    }

    public void setGoodCountry(Integer goodCountry) {
        this.goodCountry = goodCountry;
    }

    public Long getTransportId() {
        return transportId;
    }

    public void setTransportId(Long transportId) {
        this.transportId = transportId;
    }

    public String getGoodsLabel() {
        return goodsLabel;
    }

    public void setGoodsLabel(String goodsLabel) {
        this.goodsLabel = goodsLabel;
    }

    public Integer getVatinvoice() {
        return isVatinvoice;
    }

    public void setVatinvoice(Integer vatinvoice) {
        isVatinvoice = vatinvoice;
    }

    public String getGoodsSelltime() {
        return goodsSelltime;
    }

    public void setGoodsSelltime(String goodsSelltime) {
        this.goodsSelltime = goodsSelltime;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public Long getPlateidTop() {
        return plateidTop;
    }

    public void setPlateidTop(Long plateidTop) {
        this.plateidTop = plateidTop;
    }

    public Long getPlateidBottom() {
        return plateidBottom;
    }

    public void setPlateidBottom(Long plateidBottom) {
        this.plateidBottom = plateidBottom;
    }

    public Integer getGoodsState() {
        return goodsState;
    }

    public void setGoodsState(Integer goodsState) {
        this.goodsState = goodsState;
    }

    public BigDecimal getGoodsMarketprice() {
        return goodsMarketprice;
    }

    public void setGoodsMarketprice(BigDecimal goodsMarketprice) {
        this.goodsMarketprice = goodsMarketprice;
    }

    public String getGoodsBody() {
        return goodsBody;
    }

    public void setGoodsBody(String goodsBody) {
        this.goodsBody = goodsBody;
    }

    public BigDecimal getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Long getCreatgroyFirst() {
        return creatgroyFirst;
    }

    public void setCreatgroyFirst(Long creatgroyFirst) {
        this.creatgroyFirst = creatgroyFirst;
    }

    public Long getCreatgroySecond() {
        return creatgroySecond;
    }

    public void setCreatgroySecond(Long creatgroySecond) {
        this.creatgroySecond = creatgroySecond;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Long getSupplyId() {
        return supplyId;
    }

    public void setSupplyId(Long supplyId) {
        this.supplyId = supplyId;
    }

    public String getGoodsDescription() {
        return goodsDescription;
    }

    public void setGoodsDescription(String goodsDescription) {
        this.goodsDescription = goodsDescription;
    }

    public String getSpuCode() {
        return spuCode;
    }

    public void setSpuCode(String spuCode) {
        this.spuCode = spuCode;
    }

    public List<GoodsSkuVO> getGoodsSkus() {
        return goodsSkus;
    }

    public void setGoodsSkus(List<GoodsSkuVO> goodsSkus) {
        this.goodsSkus = goodsSkus;
    }

    public String getReturnAddress() {
        return returnAddress;
    }

    public void setReturnAddress(String returnAddress) {
        this.returnAddress = returnAddress;
    }

    public List<GoodsPictureVO> getGoodsPicture() {
        return goodsPicture;
    }

    public void setGoodsPicture(List<GoodsPictureVO> goodsPicture) {
        this.goodsPicture = goodsPicture;
    }

    public String getGoodsImage() {
        return goodsImage;
    }

    public void setGoodsImage(String goodsImage) {
        this.goodsImage = goodsImage;
    }

    public Integer getSaledStorage() {
        return saledStorage;
    }

    public void setSaledStorage(Integer saledStorage) {
        this.saledStorage = saledStorage;
    }

    public Integer getGoodsViews() {
        return goodsViews;
    }

    public void setGoodsViews(Integer goodsViews) {
        this.goodsViews = goodsViews;
    }

    public Long getMaterialSpuId() {
        return materialSpuId;
    }

    public void setMaterialSpuId(Long materialSpuId) {
        this.materialSpuId = materialSpuId;
    }

    public String getMaterialSpuCode() {
        return materialSpuCode;
    }

    public void setMaterialSpuCode(String materialSpuCode) {
        this.materialSpuCode = materialSpuCode;
    }

    public String getMaterialSpuName() {
        return materialSpuName;
    }

    public void setMaterialSpuName(String materialSpuName) {
        this.materialSpuName = materialSpuName;
    }

    public Integer getSaleStorage() {
        return saleStorage;
    }

    public void setSaleStorage(Integer saleStorage) {
        this.saleStorage = saleStorage;
    }

    public Long getWdtGoodsId() {
        return wdtGoodsId;
    }

    public void setWdtGoodsId(Long wdtGoodsId) {
        this.wdtGoodsId = wdtGoodsId;
    }

    public List<CommodityMaterialSpuRelationshipVO> getCommodityMaterialSpuRelationship() {
        return commodityMaterialSpuRelationship;
    }

    public void setCommodityMaterialSpuRelationship(List<CommodityMaterialSpuRelationshipVO> commodityMaterialSpuRelationship) {
        this.commodityMaterialSpuRelationship = commodityMaterialSpuRelationship;
    }

    public String getTransportName() {
        return transportName;
    }

    public void setTransportName(String transportName) {
        this.transportName = transportName;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public GoodsTaxVO getGoodsTax() {
        return goodsTax;
    }

    public void setGoodsTax(GoodsTaxVO goodsTax) {
        this.goodsTax = goodsTax;
    }

    public String getNoDeliveryRegionId() {
        return noDeliveryRegionId;
    }

    public void setNoDeliveryRegionId(String noDeliveryRegionId) {
        this.noDeliveryRegionId = noDeliveryRegionId;
    }

    public String getNoDeliveryRegionName() {
        return noDeliveryRegionName;
    }

    public void setNoDeliveryRegionName(String noDeliveryRegionName) {
        this.noDeliveryRegionName = noDeliveryRegionName;
    }
}
